Web applications performed by web clients typically use asynchronous requests to access resources from web servers. Asynchronous requests are used so that web applications can access resources in the background without interfering with the existing webpage.
The number of concurrent asynchronous requests that can be performed by a web application may be limited by web browsers. The limit may be set to two concurrent requests in the Hypertext Transfer Protocol (HTTP) version 1.1 specification. An example of a technology used to implement asynchronous requests is Ajax (asynchronous JavaScript+Extensible Markup Language). Ajax requests from a client can retrieve data asynchronously in the background from a server, without affecting an existing webpage.
The limit may result in important performance impacts and bottlenecks in the context of web applications made of “widgets” (a widget is any piece of dynamic content that can be placed into a web page). Widgets can use the native interface provided by the browsers for example, an XMLHttpRequest object in JavaScript) to fetch content over asynchronous requests. The web application embedding a widget has no direct control on the logic executed by the widget and, in particular, whether an asynchronous request has been triggered by the widget.
Other examples of performance impacts resulting from a limit may include: a long response time for a request that is queued by a browser; and, an overflow of the number of requests when a webpage is loaded. The limit also results in an inability to set a level of priority to the requests. Further, optimizations may not be possible, because two or more requests to the same resource sent by different widgets (or different instances of the same widget) at (roughly) the same time may be handled in the same way as independent requests when it would be possible to fetch the resource only once.
Another example of a performance impact resulting from the limit may be the difficulty for the web application to have control over the web browser queue. The web browser request queue is ordered, which means that a long response time for a request currently processed by the web browser can cause the subsequent requests to be queued by the web browser until the response for the currently processed request is received, even if the subsequent requests could potentially return much faster than the currently processed request.